#include <stdio.h>
#include <assert.h>
void cal_num(int num);
//统计输入十进制数每位数字，比如1234
int main()
{
    int num = 0;
    scanf("%d", &num);

//    assert(num != 110);
    cal_num(num);
}
//1234
void cal_num(int num)
{
    while (num)
    {   int n = num%10;
        num = num/10;
        printf("%d ", n);
    }
}